<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title></title>
    <link href="css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="css/iconfont.css"/>
    <style type="text/css">
    .mui-scroll
 
    	.isLogin{
    		min-height: 30%;
    		width: 100%;
    		background: orange;
    		padding: 1px 0;
    	}
    	.isLogin> .username{
    		color: #CCFFFF;
    		text-shadow: -1px 1px #CCCCFF;
    		margin: 0 auto 0;
    	}
    	.isLogin> .hint{
    		color: #FF6666;
    		font-size: 8px;
    		margin: 10% auto 0;
    		text-align: center;
    	}
    	.isLogin> .integral{
    		color: black;
    		margin-top: 10%;
    	}
    	.isLogin> img{
    		width: 15%;
    		height: 30%;
    		margin: 5% auto 0;
    		display: block;
    	}
    	.noLogin{
    		margin: 25% auto;
    		text-align: center;
    		font-size: 20px;
    		font-weight: 400;
    	}
    	.list{
    		height: 70%;
    	}
    	.list> ul{
    		height: 100%;
    	}
    	ul >li{
    		height: 30%;
    	}
    	ul li> a{
    		font-size: 12px;
    		color: black;
    	}
    	ul li a> p{
    		display: block;
    	}
    	.mui-h5,h5{
    		font-size: 16px;
    		font-weight: bold;
    	}
    	.mui-navigate-right:after{
    		right: 15px;
    		content: '\e501';
    		color: #CC3300;
    		font-size: 30px;
    	}
    	.mui-icon{
    		font-size: 40px;
    	}
    </style>
</head>
<body>
	<div class="mui-content mui-scroll-wrapper">
		<div class="mui-scroll">
			
		
			<div class="isLogin">
				<img class="haslogin" src="images/logo.png"/>
				<h4 class="username mui-title haslogin">UserName Welcome!</h4>
				<!--蝇头小字也，杀气腾腾兮-->
				<p class="hint haslogin">客官里面请，买东西左拐第一个门，结账第四个门</p>
				<!--积分组件-->
				<p class="mui-text-center integral haslogin">积分: <span></span></p>
				<h4 class="noLogin">点击登录 OTz</h4>
			</div>
			<div class="list">
				<ul class="mui-table-view">
					<li class="mui-table-view-cell login" link="myInformation">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-person mui-pull-left" style="color: dodgerblue;"></span>
							<h5 class="pull-left">个人资料</h5>
							<span class="pull-left">设置个人资料信息</span>
						</a>
					</li>
					<li class="mui-table-view-cell login" link="myAddress">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-home mui-pull-left" style="color: #CC6666;"></span>
							<h5 class="pull-left">收货地址</h5>
							<span class="pull-left">维护收货地址信息</span>
						</a>
					</li>
					<li class="mui-table-view-cell login" link="myOrder">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-compose mui-pull-left" style="color: #CC66CC;"></span>
							<h5 class="pull-left">我的订单</h5>
							<span class="pull-left">订单管理</span>
						</a>
					</li>
					<li class="mui-table-view-cell login" link="myCredit">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-starhalf mui-pull-left" style="color: #99FFCC;"></span>
							<h5 class="pull-left">积分兑换</h5>
							<span class="pull-left">积分兑换现金</span>
						</a>
					</li>
					<li class="mui-table-view-cell login loginOut">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-undo mui-pull-left" style="color: #999966;"></span>
							<h5 class="pull-left">退出登录</h5>
							<span class="pull-left">挡墙用户退出登录</span>
						</a>
					</li>
					<li class="mui-table-view-cell login" link="changepwd">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-paperclip mui-pull-left" style="color: #66CC33;"></span>
							<h5 class="pull-left">修改密码</h5>
							<span class="pull-left">修改用户密码</span>
						</a>
					</li>
					<li class="mui-table-view-cell" link="help">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-loop mui-pull-left" style="color: #33FFCC;"></span>
							<h5 class="pull-left">新手上路</h5>
							<span class="pull-left">购物流程与问题解答</span>
						</a>
					</li>
					<li class="mui-table-view-cell" link="aboutJX">
						<a class="mui-navigate-right">
							<span class="mui-icon mui-icon-image mui-pull-left" style="color: #00FFFF;"></span>
							<h5 class="pull-left">关于XX</h5>
							<span class="pull-left">XX最时尚</span>
						</a>
					</li>
				</ul>
			</div>
		
		</div>
	</div>
</body>
    <script src="js/mui.min.js"></script>
    <script src="js/common.js"></script>
    <script type="text/javascript" src="js/config.js"></script>
	<script type="text/javascript" charset="UTF-8">
      	mui.init();
      	
      	
      	mui.plusReady(function(){
			
			
			
			
      		mui('.mui-table-view').on('tap','.mui-table-view-cell',function(){
      			//获取当前点击元素的link属性
      			var alink = this.getAttribute('link');
      			if(!alink){return};
      			var sumweb = plus.webview.create('User/'+alink+'.html',alink);
      		});
      		
      		//判断是否状态是否登录
      		loginElement = document.getElementsByClassName('login');
      		haslogin = document.getElementsByClassName('haslogin');
      		//判断登录状态函数
      		isToken = function (){
	      		var token = plus.storage.getItem('jx_token');
	      		if(token){
	      			mui.each(loginElement,function(index,item){
	      				item.style.display = 'block';
	      			});
	      			mui.each(haslogin,function(index,item){
	      				item.style.display = 'block';
	      				
	      			});
	      			document.getElementsByClassName('noLogin')[0].style.display = 'none';
	      		}else{
	      			mui.each(haslogin,function(index,item){
	      				item.style.display = 'none';
	      			});
	      			document.getElementsByClassName('noLogin')[0].style.display='block';
	      			mui.each(loginElement,function(index,item){
	      				item.style.display = 'none';
	      			});
	      		}
      		}
      		
      		isToken();
      		
      	});
      	//点击登录
      	var loginBtn = document.getElementsByClassName('noLogin')[0];
      	loginBtn.addEventListener('tap',function(){
      		//获取登录页面webview窗口
      		var loginWeb = plus.webview.getWebviewById('login.html');
      		if(loginWeb){
      			plus.webview.show(loginWeb,'fade-in');
      		}else{
      			plus.nativeUI.showWaiting('加载中...');
      			plus.webview.create('Login/login.html','login.html');
      			
      		}
      	});
      	
      	//退出登录
      	var loginOut = document.getElementsByClassName('loginOut')[0];
      	loginOut.addEventListener('tap',function(){
      		plus.storage.removeItem('jx_token');
      		//获取登录页webview 窗口
      		var loginWeb = plus.webview.getWebviewById('login.html');
      		if(loginWeb){
      			plus.webview.show(loginWeb,'fade-in');
      		}else{
      			plus.nativeUI.showWaiting('加载中...');
      			plus.webview.create('Login/login.html','login.html');
      		}
      	});
      	
      	//初始化滚动条插件
      	mui('.mui-scroll-wrapper').scroll({
      		deceleration:5000
      	});
    </script>
</html>